<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>后盾人</title>
  </head>
  <body></body>
  <script>
    let hd = [1, 2, 3, 4, 5];
    let arr = hd;
    hd.length = 0;
    // hd = [];
    console.log(arr);
    // hd = [];
    // hd.length = 0;
    // hd.splice(0, hd.length);
    // while (hd.pop()) {}
    console.log(hd);
  </script>
</html>
